home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 11 / Amoszine 11 (Disk 2 of 2).adf / Loads_Of_Source.lha / negative_pic.amos / negative_pic.amosSourceCode
Encoding:
AMOS Source Code  |  1980-10-03  |  665 b   |  46 lines

  1. ' ******************** 
  2. ' *** NEGATIVE PIC *** 
  3. ' ******************** 
  4.  
  5. ' *** This Routine Re-Arranges The Colours In The Palette So That They 
  6.  
  7. '     Are All Negatives Of Themselves. 
  8.  
  9. ' *** Load Picture.
  10.  
  11. F$=Fsel$("","","Load IFF Picture")
  12. If F$<>""
  13.    Load Iff F$,0
  14. Else 
  15.    Direct 
  16. End If 
  17.  
  18. ' *** Wait.
  19.  
  20. Wait 50
  21.  
  22. ' *** Make Colours Negative. 
  23.  
  24. For LOP=0 To Screen Colour-1
  25.    
  26.    ' *** Get Colour Values - Red, Green & Blue. 
  27.    
  28.    R=Colour(LOP)/256
  29.    G=Colour(LOP)/16 mod 16
  30.    B=Colour(LOP) mod 16
  31.    
  32.    ' *** Make Negative Colour.
  33.    
  34.    R=15-R
  35.    G=15-G
  36.    B=15-B
  37.    
  38.    ' *** Change Colour. 
  39.    
  40.    Colour LOP,R*256+G*16+B
  41.    
  42. Next LOP
  43.  
  44. ' Quit.
  45.  
  46. Direct